<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <script>
        // 利用扩展运算符将伪数组转换为真正的数组
        var div = document.getElementsByTagName('div');
        console.log(div);
        var arr = [...div];
        console.log(arr);
        arr.push('a');
        console.log(arr);
    </script>
</body>

</html>